/*
 * $Id: Table.java 56 2009-05-11 10:11:46Z donbeave $
 */

package labour.dbmanager.client.model;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

@SuppressWarnings("serial")
public class Table extends DataBaseItem<Table> {

  public static final String SCHEMA_NAME = "schemaName";

  public Table() {
    set("fieldsCount", 0);
  }

  public int getColumnsCount() {
    return get("fieldsCount");
  }

  public boolean hasColumns() {
    if (getColumnsCount() > 0) {
      return true;
    }
    return false;
  }

  public void getColumns(AsyncCallback<List<Column>> callback) {
    connector().getColumns(this, callback);
  }

  public void onSave(AsyncCallback<Table> callback) {

  }

  public void onUpdate(AsyncCallback<Table> callback) {

  }

  public void onRemove(AsyncCallback<Table> callback) {

  }

}
